package de.kraenksoft.android.cinemaExample.views;

import java.util.List;
import java.util.Map;

public interface MovieListView {
	
	/**
	 * The key for the movie name that must be used in the map in setMovies.
	 */
	public static String MOVIENAMEKEY = "name";
	/**
	 * The key for the movie screenings that must be used in the map in {@link #setMovies(List)}.
	 */
	public static String MOVIESCREENINGSKEY = "screenings";
	
	/**
	 * @param caption
	 */
	void setCaption(String caption);
	
	/**
	 * Defines whether the button to show the next day is visible.
	 * @param visible
	 */
	void setNextDayButtonVisible(boolean visible);
	
	/**
	 * Defines whether the button to show the previous day is visible.
	 * @param visible
	 */
	void setLastDayButtonVisible(boolean visible);
	
	/**
	 * Sets the movie screenings that must be displayed by this view.
	 * The Maps in the list must contain two values for the keys {@link MovieListView#MOVIENAMEKEY} and {@link MovieListView#MOVIESCREENINGSKEY}.
	 * @param movies
	 */
	void setMovies(List<Map<String, String>> movies);
	
	/**
	 * Defines whether the "loading data" dialog is shown.
	 * @param active
	 */
	void showLoadingData(boolean active);

	/**
	 * Sets the error text.
	 * @param errorText
	 */
	void setErrorText(String errorText);

}
